#include <stdio.h>
#include <stdlib.h>
#include "ping.h"

int main(int argc, char **argv) {
  const char *host = NULL;
  // 输入命令行参数
  if(argc >= 2) host = argv[1];
  else {
    // 没有参数，退出
    fprintf(stderr, "Usage: ping {domain|ip}\n");
    exit(0);
  }
  start_ping(host);
}
